package com.xiaoxin.datinghubback.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
//对当前接口类设置标签，本接口类为存放不需要权限验证的接口类，例如登录注册等等
@Api(tags="无权限接口列表")
@RestController
public class WebController {
    @GetMapping(value = "/")
    @ApiOperation(value ="版本校验接口")
    public String version() {
        String ver = "XIAOXINDatingHub-back-0.0.1-SNAPSHOT";  // 应用版本号
        Package aPackage = WebController.class.getPackage();
        String title = aPackage.getImplementationTitle();
        String version = aPackage.getImplementationVersion();
        if (title != null && version != null) {
            ver = String.join("-", title, version);
        }
        return ver;
    }
}
